package com.whenjun.thread;

import com.alibaba.fastjson.JSONObject;
import com.whenjun.common.LoggerParent;
import com.whenjun.entity.IscDoorRecord;
import com.whenjun.service.impl.KqAlarmServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncServiceEvent extends LoggerParent {

    @Autowired
    private KqAlarmServiceImpl kqAlarmService;

    @Async("asyncServiceExecutor")
    public void calcFloorRestTime(IscDoorRecord iscDoorRecord) {
        kqAlarmService.calcFloorRestTimeV2(iscDoorRecord);
    }

    @Async("asyncServiceExecutor")
    public void calcWcRestTime(IscDoorRecord iscDoorRecord) {
        kqAlarmService.calcWcRestTimeV2(iscDoorRecord);
    }

    @Async("asyncServiceExecutor")
    public void calcOneRestTime(IscDoorRecord iscDoorRecord) {
        kqAlarmService.calcOneRestTimeV2(iscDoorRecord);
    }
}
